1. Technical Field
The present invention relates in general to bus error handling and in particular to handling bus errors during load and store operations. Still more particularly, the present invention relates to preventing damage from bus errors during load and store operations through forced bad data parity or zero byte enables thereby enhancing the capability of recovering from such errors.
2. Description of the Related Art
Many data processing systems support a standard input/output (I/O) systems conforming to the peripheral component interconnect (PCI) Local Bus architecture, an architecture supporting many complex features including I/O expansion through PCI-to-PCI bridges, peer-to-peer (device-to-device) data transfers, multi-function devices, and both integrated and plug-in devices. In setting up I/O operations to I/O devices on a PCI bus, the device driver must perform a series of load and/or store operations to the I/O device. If any of these operations gets a parity error on the I/O bus, it is necessary to get this information back to the device driver so that the device driver can stop before the operation is initiated.
As an example, a first store operation may be employed to set up an address in the I/O device, followed by a second store operation signalling the I/O device to begin the data transfer. If the first store operation gets an error and the second store operation is then received, the I/O device might start the operation to the incorrect location. The PCI architecture includes no provision for designing adapters to prevent load and/or store operations from continuing after an error. Most contemporary systems allow device driver execution to continue after a store operation rather than wait for a "successful" response to the store operation to determine if it completely correctly. This is preferable since the processor stall required to wait for a response to store operations would vastly degrade system performance.
One technique allowing the device driver to prevent subsequent load and/or store operations from completing after an error without waiting for the response to every load or store operation is for the device driver to read back all of the setup information before issuing the "go" store operation (the store operation signalling the device driver to begin) and then compare the read back data with the stored data to determine if the two are the same prior to issuing the "go" store operation. However, this requires a lot of processor time for the load operations out to the device, a long path, in many cases, relative to processor instruction times. Another possible solution is to examine bits within the interface or status registers within the I/O device to determine whether an error has occurred after a store operation. This, however, is unsupported by current architectures and also requires a lot of processor time.
Yet another solution is for an I/O device to generate an external interrupt when there is an error after a store operation, but waiting for an interrupt before continuing takes a lot of time. Other conceivable possibilities will generally be adapter dependent, and thus incapable of working with any I/O device not designed for that solution, or will require a lot of processor time.
It would be desirable, therefore, to provide a method and apparatus for preventing load and/or store operations from completing after an error without waiting for a response to every load or store operation. It would also be advantageous for the mechanism to avoid requiring changes to PCI adapter or I/O device hardware, so that the mechanism may be employed with any I/O device, even if not designed specifically for that mechanism.